package com.hitqz.robot.driver.util;

import java.util.HashMap;
import java.util.Map;

/**
 * 机器人队列状态
 */
public enum QueueStatusEnum {

 // 1-巡检，2-巡逻，3-服务 4-运输任务

    READY(0, "待命"),

    RUNNING(1, "正在执行队列"),

    OVER(2, "队列完成"),

    HOLDING(3, "队列挂起"),

    CHARGING(4, "正在充电"),

    OBSTACLE(5, "激光雷达触发"),

    STOP(6, "紧急停止"),

    ERROR(7, "故障"),

    LOST(8, "位置丢失"),

    FAIL(9, "任务失败"),

    DERAIL(10, "脱轨"),
    ;

    /**
     * 机器人队列状态
     */
    public static Map<Integer, String> ROBOT_QUEUE_STATUS =new HashMap<>(16);


    static {
        for (QueueStatusEnum value: values()) {
            QueueStatusEnum.ROBOT_QUEUE_STATUS.put(value.key, value.name);
        }
    }

    private Integer key;

    private String name;

    QueueStatusEnum(Integer key, String name) {
        this.key = key;
        this.name = name;
    }

    public Integer getKey() {
        return key;
    }

    public String getName() {
        return name;
    }
}
